import 'package:safetymonitor/app/data/common/choice_bean.dart';
import 'package:safetymonitor/generated/json/base/json_field.dart';
import 'package:safetymonitor/generated/json/system_user_page_entity.g.dart';
import 'dart:convert';
export 'package:safetymonitor/generated/json/system_user_page_entity.g.dart';

@JsonSerializable()
class SystemUserPageEntity extends ChoiceBean {
  int? id = 0;
  String? username = '';
  String? nickname = '';
  String? remark = '';
  int? deptId = 0;
  String? deptName = '';
  List<int>? postIds = [];
  String? email = '';
  String? mobile = '';
  int? sex = 0;
  String? avatar = '';
  int? status = 0;
  String? loginIp = '';
  dynamic loginDate;
  int? createTime = 0;

  SystemUserPageEntity();

  factory SystemUserPageEntity.fromJson(Map<String, dynamic> json) =>
      $SystemUserPageEntityFromJson(json);

  Map<String, dynamic> toJson() => $SystemUserPageEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return '$id';
  }

  @override
  String getShowName() {
    return nickname ?? '';
  }
}
